package com.csx.base.design.structure.adapter;

/**
 * 通用适配器 2to3
 * -
 * - <p> [: =□------------
 * -
 * @author cuisongxu
 * @date 2022/9/20 12:14
 */
public class DualPinToTripleAdapter implements TriplePin {

    private DualPin dualPinDevice;

    /**
     * 创建适配器时，将两插设备接入进来
     */
    public DualPinToTripleAdapter(DualPin dualPinDevice) {
        this.dualPinDevice = dualPinDevice;
    }

    @Override
    public void electrify(int l, int n, int e) {
        // 调用被适配设备的两插通电方法，忽略地线参数e
        dualPinDevice.electrify(l, n);
    }
}
